package com.time.tell.the.truth.netty.server;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class ServerChannelHandler extends ChannelInboundHandlerAdapter {

  @Override
  public void channelRead(ChannelHandlerContext ctx, Object msg) {
    assert msg instanceof NioServerSocketChannel;

    log.info("handle ServerChannel: {}", msg);
    ctx.fireChannelRead(msg);
  }
}
